package com.rayframework.context.common.constant;

import com.ray.tool.file.RayFileTools;
import com.rayframework.context.utils.ApplicationConfigUtils;
import com.rayframework.core.common.constant.RayCoreConstants;


/**
 * 框架整合启动类 - 常量池
 * 存放 public static final 常量
 *
 * @author LiaoYuXing-Ray
 * @version 1.0
 * @createDate 2023/9/26 17:56
 * @see RayCoreConstants
 **/
public class RayContextConstants {
    /**
     * application.properties 配置文件绝对路径 2023/9/7 16:29
     */
    public static final String APPLICATION_PROPERTIES_PATH;
    /**
     * 用户插件路径 - 字符串 2023/9/15 14:47
     * <p style="color:orange">
     * 值（示例）：F:\rx\project\rayFramework\boot.ray\plugin
     * </p>
     */
    public static final String PLUGIN_PATH;

    /**
     * Ray框架可被修改的配置项数组 2023/9/14 16:04
     */
    public static final String[] CAN_UPDATE_APPLICATION_PROPERTY_KEY = {
            "Ray.Console",
            "Ray.Console.print.text.color"
    };

    static {
        APPLICATION_PROPERTIES_PATH = RayFileTools.pathCombine(1,
                ApplicationConfigUtils.getAppRoot(), "src", "main", "resources", RayCoreConstants.APPLICATION_PROPERTIES);
        PLUGIN_PATH = RayFileTools.pathCombine(1, System.getProperty("user.dir"), RayCoreConstants.PLUGIN);
    }
}
